package com.cy.pj.sys.entity;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

@Data
@Accessors(chain = true)
public class SysDept implements Serializable {
    private static final long serialVersionUID = 1816496607445497878L;
    private Integer id;
    private String name;
    private Integer parentId;
    private Integer sort;
    private String note;
    private Date createdTime;
    private Date modifiedTime;
    private String createdUser;
    private String modifiedUser;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysDept sysDept = (SysDept) o;
        return Objects.equals(name, sysDept.name) &&
                Objects.equals(parentId, sysDept.parentId) &&
                Objects.equals(sort, sysDept.sort);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, parentId, sort);
    }
}
